package com.hjj.beans;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Stu {
    @Min(value = 1, message = "id不能低于1")
    @Max(value = 1000, message = "id不能高于1000")
    private int id;

    @NotNull(message = "姓名不能为空")
    @NotEmpty(message = "姓名不能为空字符串")
    private String name;

    @Min(value = 0, message = "score不能低于0")
    @Max(value = 100, message = "score不能高于100")
    private float score;

}
